import { Modal } from 'antd';
import React from 'react';

interface ModelsProps {
  [as: string]: any;
}

const Models: React.FC<ModelsProps> = props => {
  const { title = '', destroyOnClose = true, closable = false, visible, handleOk, handleCancel, children, footer = null, maskClosable = false, width, className } = props;
  return (
    <Modal
      title={title}
      destroyOnClose={destroyOnClose}
      closable={closable}
      visible={visible}
      onOk={handleOk}
      onCancel={handleCancel}
      footer={footer}
      maskClosable={maskClosable}
      width={width}
      className={className}>
      {children}
    </Modal>
  );
};

export default Models;
